﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Master/ConfigAdmin.Master"
    AutoEventWireup="true" CodeBehind="ModelList.aspx.cs" Inherits="Besture.UI.Admin.CommonModel.ModelList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <div class="listPage">
        <!-- Begin 操作条 -->
        <div class="operateBar">
            <ul>
                <li>
                    <asp:LinkButton ID="lbAdd" runat="server" class="" OnClick="btnAdd_Click"><s class="icon-add-gray"></s>添加模型</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="lbCreate" runat="server" class="" OnClick="lbCreate_Click"><s class="icon-export-gray"></s>生成内容模型管理页面</asp:LinkButton>
                </li>
            </ul>
        </div>
        <!-- //End 操作条 -->
        <cms:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" Width="100%"
            AutoGenerateColumns="False" KeyFieldName="ID" OnCustomCallback="grid_CustomCallback"
            OnRowDeleting="grid_RowDeleting">
            <Columns>
                <cms:GridViewCommandColumn ShowSelectCheckbox="true" VisibleIndex="0" Width="50px"
                    FixedStyle="Left">
                    <HeaderTemplate>
                        <input type="checkbox" onclick="grid.SelectAllRowsOnPage(this.checked);" title="全选/全不选"
                            id="chkAll" runat="server" />
                    </HeaderTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                </cms:GridViewCommandColumn>
                <cms:GridViewDataTextColumn Caption="操作" VisibleIndex="2" Width="120px" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FixedStyle="Left">
                    <DataItemTemplate>
                        <div class="operateBox">
                            <a class="btn-text" href="ModelSet.aspx?id=<%# Eval("ID") %>" title="编辑">编辑</a>|
                            <a class="btn-text" onclick="window.setTimeout(function(){aspxGVDeleteRow('ctl00_Content_grid',<%# Container.ItemIndex %>);},0)"
                                title="删除">删除</a>
                        </div>
                    </DataItemTemplate>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="字段列表" VisibleIndex="2" Width="10%" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FixedStyle="Left">
                    <DataItemTemplate>
                        <a href="FieldList.aspx?ModelID=<%# Eval("ID") %>" target="_blank">编辑字段</a>
                    </DataItemTemplate>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="内容模型名称" VisibleIndex="3" Width="30%" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="Name">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="数据库表名" VisibleIndex="4" Width="10%" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center" FieldName="TableName">
                    <Settings AutoFilterCondition="Contains"></Settings>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="类型" VisibleIndex="5" Width="10%" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center">
                    <DataItemTemplate>
                        <%# Eval("IsSystem").ToString().Equals("1")?"系统内置":"后期配置" %>
                    </DataItemTemplate>
                </cms:GridViewDataTextColumn>
                <cms:GridViewDataTextColumn Caption="管理页面" VisibleIndex="6" Width="10%" HeaderStyle-HorizontalAlign="Center"
                    CellStyle-HorizontalAlign="Center">
                    <DataItemTemplate>
                        <a href="/Admin/CommonModel/AutoMatic/USER_<%#Eval("TableName") %>List.aspx" target="_blank">
                            <%# Eval("IsSystem").ToString().Equals("1")?"":"管理页面" %></a>
                    </DataItemTemplate>
                </cms:GridViewDataTextColumn>
            </Columns>
        </cms:ASPxGridView>
    </div>
</asp:Content>
